One-click installation of lamp in CentOS
Step 1: Download, decompress, and grant permissions: [html] view plaincopy
- Wget -- no-check-certificatehttps: // github.com/teddysun/lamp-yum/archive/master.zip-Olamp-yum.zip
- Unziplamp-yum.zip
- Cdlamp-yum-master/
- Chmod + x *. sh
Step 2: Install LAMP
Enter the following command in the terminal:
./lamp.sh 2>&1 | tee lamp.log
TIPS:
- Lamp uninstall: one-click LAMP deletion (remember to back up data before deleting it !)
Directory description:
- MySQL or MariaDB database Directory:/var/lib/mysql/
Command Overview:
MySQL or MariaDB command:
/etc/init.d/mysqld(start|stop|restart|reload|status)
Apache command:
/etc/init.d/httpd(start|stop|restart|reload|status)
Step 3: domain name resolution
Cd/etc/httpd/conf and then edit the httpd. conf file
Vim httpd. conf find the last few lines in the file # <VirtualHost *: 80>, and then add the following code to the end tag of this module.
[Html] view plaincopy
- <VirtualHost *: 80>
- ServerAdminwww.ugomi.com
- DocumentRoot "/data/www/ugomi"
- ServerNamewww.ugomi.com
- </VirtualHost>