菜鳥上----路論壇搭建
阿新 • • 發佈:2018-09-13
scu 基礎環境 地址 b- index epo ide pin -s LAMP:搭建一個網站平臺
基礎環境搭建
1.要有一個幹凈的系統
2.配yum源
mount:查看是否有掛載
mkdir /opt/dvd
ls /opt/
mount /dev/sr0 /opt/dvd
ls /opt/dvd ?>
基礎環境搭建
1.要有一個幹凈的系統
2.配yum源
mount:查看是否有掛載
mkdir /opt/dvd
ls /opt/
mount /dev/sr0 /opt/dvd
ls /opt/dvd
cd /etc/yum.repos.d/ vi dvd.repo [dvd= name=dvd baseurl=file:///opt/dvd/ gpgkey=0 yum clean all yum list 4.主機修改 (1) vi /etc/hostname (login:退出連接工具 重新連接 主機名就更改過來了) (2)DNS域名修改:vi /etc/hosts ip地址 主機名 cat /etc/hosts(查看域名修改) (3) ping 主機名 5.防火墻關閉 iptables -F iptables -X setenforce 0 6.安裝軟件包 yum install httpd httpd-devel mariadb-server mariadb-devel php php-mysql php-devel
- systemctl restart {httpd,mariadb}
- systemctl status httpd
-
systemctl status mariadb
- mysqladmin -u root password 000000
- mysqladmin -u root p000000
- exit
13.ss -tnmlp | grep mysql
ss -tnmlp | grep httpd
14.mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.confbak
15.cd /var/www/html
16.vi index.php
<?php
phpinfo()
ls
把discuz的論壇上傳到xshll連接工具上
cd:先切換到家目錄下
17.mv /var/www/html/index.php /mnt
18.yum install unzip
-
unzip Discuz_X3.1_SC_UTF8.zip -d /var/www/html
- cd /var/www/html
- ls
22.cd upload/
23.ls
24.cp -rf* /varwww/html/
25.cd /var/www/html
26.ls
27.mysql -uroot -p
show databases;
create database discuz;
show databases;
greant all on discuz.* to discuz@‘localhost‘ identified by "000000";
flush privileges;
exit
28. mysql -uroot -p
show databases;
use discuz;
show tab;
exit
29.chown apache.apache /var/www/html
30.mysql -uroot -p
show databases:
use discuz;
how tables:
菜鳥上----路論壇搭建