This tutorial exists for these OS versions. CentOS 7.4. On this page. This tutorial shows how to install an Apache web server on CentOS 7 server with PHP (modphp) and MySQL database.
The acronym LAMP is short for Linux, Apache, MySQL, PHP. This updated tutorial shows the installation of the latest PHP versions (7.0, 7.1 and 7.2) on CentOS 7.4. 1 Preliminary Note In this tutorial, I use the hostname server1.example.com with the IP p 192.168.1.100.
![]()
These settings might differ for you, so you have to replace them where appropriate. I will add the EPEL repo here to install latest phpMyAdmin as follows: rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY. yum -y install epel-release To edit files on the shell, I'll install the nano editor.
If you prefer vi for file editing, then skip this step. Yum -y install nano 2 Installing MySQL / MariaDB MariaDB is a MySQL fork of the original MySQL developer Monty Widenius. MariaDB is compatible with MySQL and I've chosen to use MariaDB here instead of MySQL. Run this command to install MariaDB with yum: yum -y install mariadb-server mariadb Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server: systemctl start mariadb.service systemctl enable mariadb.service Set passwords for the MySQL root account: mysqlsecureinstallation # mysqlsecureinstallation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE!
She had never been in love, but she believed that it was a wonderful thing. This has made him quite popular and loved, resulting in a 21,000 yen (taxes included) ‘love bounty’ placed on him.
![]()
PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user.
If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here.
There is no equivalent. Debian/Ubuntu butcher the apache configuration into a large number of files, where directories of mods and sites enabled are symlinked to other snippets of configuration files. The a2enmod/a2ensite scripts just manipulate these symlinks. Typically, on a Redhat system, you'll find a line that looks like this inside /etc/httpd/conf/httpd.conf: Include conf.d/.conf When you copy a configuration file into /etc/httpd/conf.d, and it has a.conf file extension, then it'll be picked up and processed as apache starts.
You'll typically find configuration files for extensions like modphp and modsvn, and applications that are integrated with the webserver like trac, inside this folder. Side note: for apache modules like modphp or modauthmysql on other systems that use RPM, like OpenSuSE, there may be other configuration files (like /etc/sysconfig/apache2) that need to get edited in order for apache to pick up a new module. Some of this is dependent on the system management tool that is being used, i.e. Some of it's dependent on aftermarket products that can be installed, like plesk/cpanel. However, the above folder is the best place to start.
Snipe-IT is a free and open source, cross-platform, feature-rich IT asset management system built using a PHP framework called Laravel. It is web-based software, which enables IT administrators in medium to large enterprises to track physical assets, software licenses, accessories and consumables in a single place. Check out a live, up-to-date version of Snipe-IT Asset Management Tool: Snipe-IT Features:. It is a cross-platform – works on Linux, Windows and Mac OS X. It is mobile-friendly for easy asset updates. Easily Integrates with. Slack notification integration for checkin/checkout.
![]()
Supports one-click (or cron) backups and automated backups. Supports optional. Supports generation of custom reports. Supports custom status labels. Supports bulk user actions and user role management for different levels of access. Supports several languages for easy localization and so much more. In this article, I will explain how to install a IT asset management system called Snipe-IT using a LAMP (Linux, Apache, MySQL & PHP) stack on CentOS and Debian based systems.
Step 1: Install LAMP Stack 1. First update the system (meaning update the list of packages that needs to be upgraded and add new packages that have entered in repositories enabled on the system). $ sudo apt update On Debian/Ubuntu $ sudo yum update On CentOS/RHEL 2. Once system has been updated, now you can install LAMP (Linux, Apache, MySQL & PHP) stack with all needed PHP modules as shown. Install LAMP on Debian/Ubuntu $ sudo apt install apache2 apache2-utils libapache2-mod-php mariadb-server mariadb-client php php-pdo php-mbstring php-tokenizer php-curl php-mysql php-ldap php-zip php-fileinfo php-gd php-dom php-mcrypt Install LAMP on CentOS/RHEL 3.
Install A2enmod
Snipe-IT requires PHP greater than 5.5.9 and PHP 5.5 has reached end of life, so to have PHP 5.6, you need to enable the Remi repository as shown. $ sudo rpm -Uvh $ sudo yum -y install yum-utils $ sudo yum-config-manager -enable remi-php56 4. Next, install PHP 5.6 on CentOS 7 with the required modules needed by Snipe-IT. $ sudo yum install httpd mariadb mariadb-server php php-openssl php-pdo php-mbstring php-tokenizer php-curl php-mysql php-ldap php-zip php-fileinfo php-gd php-dom php-mcrypt 5. After the LAMP stack installation completes, start the web server for the mean time, and enable it to start on the next system boot with the following command. $ sudo systemctl start enable status apache2 On Debian/Ubuntu $ sudo systemctl start enable status httpd On CentOS/RHEL 6.
Next verify Apache and PHP installation and all its current configurations from a web browser, let’s create a info.php file in the Apache DocumentRoot ( /var/www/html) using the following command. $ sudo echo ' sudo tee -a /var/www/html/info.php Now open a web browser and navigate to following URL’s to verify Apache and PHP configuration. Next, you need to secure and harden your MySQL installation using the following command.
![]()
$ sudo mysqlsecureinstallation You will be asked you to set a strong root password for your MariaDB and answer Y to all of the other questions asked (self explanatory). Finally start MySQL server and enable it to start at the next system boot. $ sudo systemctl start mariadb OR $ sudo systemctl start mysql Step 2: Create Snipe-IT Database on MySQL 9.
Now log in to the MariaDB shell and create a database for Snipe-IT, a database user and set a suitable password for the user as follows. $ mysql -u root -p Provide the password for the MariaDB root user. MariaDB (none) CREATE DATABASE snipeitdb; MariaDB (none) CREATE USER 'tecmint'@'localhost' IDENTIFIED BY 't&'; MariaDB (none) GRANT ALL PRIVILEGES ON snipeitdb. TO 'tecmint'@'localhost'; MariaDB (none) FLUSH PRIVILEGES; MariaDB (none) exit Step 3: Install Composer – PHP Manager 10. Now you need to install Composer – a dependency manager for PHP, with the commands below. $ sudo curl -sS php $ sudo mv composer.phar /usr/local/bin/composer Step 4: Install Snipe-IT Asset Management 11.
First install Git to fetch and clone the latest version of Snipe-IT under Apache web-root directory. $ sudo apt -y install git On Debian/Ubuntu $ sudo yum -y install git On CentOS/RHEL $ cd /var/www/ $ sudo git clone 12. Now go into the snipe-it directory and rename the.env.example file to.env.
$ cd snipe-it $ ls $ sudo mv.env.example.env Step 5: Configure Snipe-IT Asset Management 13. Next, configure the snipe-it environment, here you’ll provide the database connection settings and many more. Zt2 download. First open the.env file. $ sudo vi.env Then Find and change the following variables according to instructions given. APPTIMEZONE=Africa/Kampala #Change it according to your country APPURL=#set your domain name or IP address APPKEY=base64:BrS7khCxSY7282C1uvoqiotUq1e8+TEt/IQqlh9V+6M= #set your app key DBHOST=localhost #set it to localhost DBDATABASE=snipeitdb #set the database name DBUSERNAME=tecmint #set the database username DBPASSWORD=password #set the database user password Save and close the file. Now you need to set the appropriate permissions on certain directories as follows.
Give More Feedback
$ sudo chmod -R 755 storage $ sudo chmod -R 755 public/uploads $ sudo chown -R www-data:www-data storage public/uploads On Debian/Ubuntu sudo chown -R apache:apache storage public/uploads On CentOS/RHEL 15. Next, install all the dependencies required by PHP using Composer dependency manager as follows. $ sudo composer install -no-dev –prefer-source 16. Now you can generate the “ APPKEY” value with the following command (this will be set automatically in the.env file). $ sudo php artisan key:generate 17. Now, you need to create a virtual host file on the web server for Snipe-IT.
$ sudo vi /etc/apache2/sites-available/snipeit.example.com.conf On Debian/Ubuntu $ sudo vi /etc/httpd/conf.d/snipeit.example.com.conf On CentOS/RHEL Then add/modify the line below in your Apache config file (use your server IP address here). ServerName snipeit.tecmint.lan DocumentRoot /var/www/snipe-it/public Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all Save and close the file. On Debian/Ubuntu, you need to enable virtual host, modrewrite and mcrypt using the following commands. $ sudo a2ensite snipeit.conf $ sudo a2enmod rewrite $ sudo php5enmod mcrypt 19. Lastly, restart Apache web server to take new changes into effect. $ sudo systemctl restart apache2 On Debian/Ubuntu $ sudo systemctl restart httpd On CentOS/RHEL Step 6: Snipe-IT Web Installation 20. Now open your web browser and enter the URL: to view the Snipe-IT web installation interface.
First you will see the Pre-Flight Check page below, click Next: Create Database Tables.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |