1. 程式人生 > >菜鳥上----路論壇搭建

菜鳥上----路論壇搭建

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

    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
  1. systemctl restart {httpd,mariadb}
  2. systemctl status httpd
  3. systemctl status mariadb

  4. mysqladmin -u root password 000000
  5. mysqladmin -u root p000000
  6. 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

  1. unzip Discuz_X3.1_SC_UTF8.zip -d /var/www/html

  2. cd /var/www/html
  3. 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:      

菜鳥上----路論壇搭建