搭建LAMP
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了搭建LAMP相关的知识,希望对你有一定的参考价值。
1 cd /etc/yum.repos.d
2 vi dvd.repo
3 cat /etc/hosts
4 vi dvd.repo
5 cat /etc/hosts
6 cd
7 cat /etc/hostname
8 vi /etc/hostname
9 hostname
10 login
11 ping fanyabo
12 vi /etc/hosts
13 ping fanyabo
14 vi /etc/hosts
15 ping fanyabo
16 ls /opt
17 mkdir /opt/dvd
18 ls /opt
19 mount /dev/sr0 /opt/dvd
20 ls /opt/dvd
21 cd /etc/yum.repos.d
22 vi dvd.repo
23 yum clean all
24 yum list
25 iptables -F
26 iptables -X
27 iptables -L
28 setenforce 0
29 cd
30 yum install httpd httpd-devel mariadb-server mariadb-devel php php-mysql php-devel
31 systemctl restart {httpd,mariadb}
32 systemctl status httpd
33 systemctl status mariadb
34 mysqladmin -u root password 000000
35 mysql -uroot -p000000
36 ss -tnmlp | grep mysql
37 uname -r
38 ss -tnmlp | grep httpd
39 cd /var/www/html/
40 pwd
41 ls
42 mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.confbak
43 ll /etc/httpd/conf.d
44 cd /var/www/html/
45 ls
46 cat /etc/httpd/conf/httpd.conf
47 pwd
48 vi index.php
49 mv /var/www/html/index.php /mnt/
50 ls /var/www/html/
51 cd
52 ls
53 yum install unzip
54 unzip Discuz-X3.1-SC-UTF8.zip -d /var/www/html/
55 unzip Discuz_X3.1_SC_UTF8.zip -d /var/www/html/
56 vi index.php
57 mv /var/www/html/index.php /mnt/
58 mv /var/www/html/index.php /mnt/
59 vi index.php
60 cd /var/www/html/
61 mv /var/www/html/index.php /mnt/
62 vi index.php
63 mv /var/www/html/index.php /mnt/
64 ls /var/www/html/
65 cd
66 ls
67 yum install unzip
68 unzip Discuz_X3.1_SC_UTF8.zip -d /var/www/html/
69 cd /var/www/html/
70 ls
71 cd upload
72 cp -rf * /var/www/html
73 cd /var/www/html/
74 ls
75 mysql -uroot -p
76 chown -R apache.apache /var/www/html
以上是关于搭建LAMP的主要内容,如果未能解决你的问题,请参考以下文章