乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      CentOS中安裝LAMP完整流程

       corefashion 2014-08-24

       安裝Cent OS


       從http://www./modules/tinycontent/index.php?id=15下載最新版本的CentOS


      更新成163源


      打開Terminate

      輸入sudo root并輸入密碼

      輸入su讓當(dāng)前用戶以root權(quán)限進(jìn)入

      輸入cd /etc/yum.repos.d

      輸入mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

      來備份/etc/yum.repos.d/CentOS-Base.repo

      輸入wget http://mirrors.163.com/.help/CentOS6-Base-163.repo下載163源

      輸入mv /etc/yum.repos.d/CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo

      輸入yum makecache完成更新



        安裝并配置MySQL

      1.1 執(zhí)行yum命令安裝MySQL

      yum -y install mysql mysql-server

      1.2 把添加MySQL進(jìn)開機(jī)啟動項,并立即啟動MySQL

      chkconfig --levels 235 mysqld on/etc/init.d/mysqld start

      1.3 設(shè)置MySQL root賬號密碼

      mysql_secure_installation

      NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


      In order to log into MySQL to secure it, we'll need the current

      password for the root user.  If you've just installed MySQL, and

      you haven't set the root password yet, the password will be blank,

      so you should just press enter here.

      Enter current password for root (enter for none): <-- 輸入系統(tǒng)root密碼

      OK, successfully used password, moving on...

      Setting the root password ensures that nobody can log into the MySQL

      root user without the proper authorisation.

      Set root password? [Y/n] <-- ENTER

      New password: <-- 你的MySQL root密碼

      Re-enter new password: <-- 你的MySQL root密碼

      Password updated successfully!

      Reloading privilege tables..

      ... Success!

      By default, a MySQL installation has an anonymous user, allowing anyone

      to log into MySQL without having to have a user account created for

      1. This is intended only for testing, and to make the installation

      go a bit smoother.  You should remove them before moving into a

      production environment.

      Remove anonymous users? [Y/n] <-- ENTER

      ... Success!

      Normally, root should only be allowed to connect from 'localhost'.  This

      ensures that someone cannot guess at the root password from the network.

      Disallow root login remotely? [Y/n] <-- ENTER

      ... Success!

      By default, MySQL comes with a database named 'test' that anyone can

      1. This is also intended only for testing, and should be removed

      before moving into a production environment.

      Remove test database and access to it? [Y/n] <-- ENTER

      - Dropping test database...

      ... Success!

      - Removing privileges on test database...

      ... Success!

      Reloading the privilege tables will ensure that all changes made so far

      will take effect immediately.

      Reload privilege tables now? [Y/n] <-- ENTER

      ... Success!

      Cleaning up...

      All done!  If you've completed all of the above steps, your MySQL

      installation should now be secure.

      Thanks for using MySQL!

      二、      安裝Apache

      2.1 使用yum命令安裝Apache

      yum –y install httpd

      2.2 設(shè)置開機(jī)啟動Apache

      chkconfig --levels 235 httpd on

      2.3 啟動Apache

      /etc/init.d/httpd start

      2.4 現(xiàn)在直接在瀏覽器鍵入http://localhost或http://本機(jī)IP,應(yīng)該會看到Apache的測試頁面


      安裝配置PHP

      3.1 使用yum命令安裝PHP

      yum –y install php

      3.2 重啟Apache服務(wù)器

      /etc/init.d/httpd restart

      3.3 安裝相關(guān)模塊使用PHP支持MySQL:為了讓PHP支持MySQL,我們可以安裝php-mysql軟件包;也可使用以下命令搜索可用的php模塊

      yum search php

      選擇需要的模塊進(jìn)行安裝

      yum –y install php-mysql php-common php-mbstring php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

      3.4 重啟Apache服務(wù)器

      /etc/init.d/httpd restart


      安裝配置phpMyAdmin

      Using YUM :

      Step 1 ? Install/enable EPEL repository . You can find latest repository here ( http://download./pub/epel/6/i386/repoview/epel-release.html )

      [root@localhost ~]# rpm -ivh http://ftp./pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm

      Step 2 ? Now update repositories

      [root@localhost ~]# yum update

      Step 3 ? After updating yum repositories , now you can install phpmyadmin package

      [root@localhost ~]# yum install phpMyAdmin

      This command will install phpmyadmin package along with dependencies . please type the package name exactly as phpMyAdmin ( ” M” and “A” –> Uppercase )

      Step 4 ? Now restart httpd service

      [root@localhost ~]# service httpd restart

      Now open the path in your browser ( Eg->  http://192.168.1.1/phpMyAdmin ) . You can see the below screen after entering Mysql root username and password .

      install Phpmyadmin centos


      4.9 至此,打開頁面http://localhost/phpmyadmin即可輕松管理你的mySQL數(shù)據(jù)庫

       

      打開CentOS網(wǎng)絡(luò)端口保證其它機(jī)器可以訪問


      #/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
      #/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
      #/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
      然后保存:
      #/etc/rc.d/init.d/iptables save

       

      查看打開的端口:


      # /etc/init.d/iptables status






        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多