zoukankan      html  css  js  c++  java
  • SUSE下试着搭建了一个web 做个记录

    安装文件我不整理了, 到各个官方下载最好。

    1. 安装mysql数据库
      1. ./configure --prefix=/usr/local/mysql --with-charset=gbk
      2. make
      3. make install

      4. groupadd mysql
      5. useradd mysql -g mysql
      6. cd /usr/local/mysql/bin
      7. ./mysql_install_db --user=mysql

      8. cd /usr/local/mysql
      9. chown -R root .
      10. chown -R mysql data
      11. chown -R mysql data/ .
      12. chown -R mysql data/mysql/ .
      13. chgrp -R mysql .
      14. /usr/local/mysql/bin/mysqld_safe --user=mysql &

      15. cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
      16. chkconfig --add /etc/init.d/mysqld
      17. chkconfig -list

      18. /usr/local/mysql/bin/mysql -uroot -p
      19. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('administrative');
      20. CREATE DATABASE parallel;
      21. source /mnt/usb/update/parallel.sh

      22. cp /usr/local/mysql/lib/mysql/libmysqlclient.* /usr/lib
      23. cp -r /usr/local/mysql/include/mysql/ /usr/include/

    2. 安装Openssl
      1. ./config --prefix=/usr/local shared
      2. make
      3. make install
    3. 安装httpd
      1. ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-ssl --with-ssl=/usr/local --enable-mods-shared=most
      2. make
      3. make install
      4. cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
      5. chkconfig -a httpd
      6. /etc/init.d/httpd start
      7. 配置http.conf
        1>. 找 <IfModele dir_module>
            DirectoryIndex index.html后面添加
              DirectoryIndex index.htm
              DirectoryIndex index.php
              DirectoryIndex index.php3
              DirectoryIndex index.php4
        2>. 在DirectoryIndex处添加: index.php
            在AddType application处添加:
              AddType application/x-httpd-php .php .phtml
              AddType applicatoin/x-httpd-php-source .phps
        3>. 修改
            <Directory />
              Options FollowSymLinks
              AllowOverride None
              Order deny,allow
              allow from all   //修改这个是因为安装了php后 默认是拒绝一切连接的
             </Directory>
        4>. 修改主目录 DocumentRoot "/home/www"
        5>. 修改监听端口为 8080 SSL 监听端口问 9999
        6>. 查看在LoadModule处 有没有 “LoadModule php5_module module/libphp5.so” 没有的话说明php没有安装成功! 生生的写在这里可能会导致 httpd不能启动!
        7>. 以上六点 设置部分先后! 请酌情处理, 谢谢!!!
    4. 安装php
      1. 应先安装libxml2,否则安装不了PHP,安装libxml2,运行下面命令即可:
        tar jxvf libxml2-2.6.23.tar.bz2
        cd libxml2-2.6.23
        ./configure
         make
        make install
      2. ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-openssl=/usr/local
      3. make
      4. make install
      5. cp php.ini-dist /usr/local/php/lib/php.ini
      6. 修改 register_globals = On 修改 php.ini 文件!  //我是把全局变量打开了,知道不安全。 技术不行,不开全局变量我项目跑不了了。具体的我没弄明白他们的项目非

        得要开全局变量

    5。设置防火墙端口
      1. 修改 SuSEfirewall2
          vi /etc/sysconfig/SuSEfirewall2
          添加 FW_SERVICES_EXT_TCP=”22 80 8080 9999″
          保存退出
        至于重启,小弟试了多种方法,改觉 还是重启比较生事情! suse下的我一些配置理解不了
        开放端口有多种方法,我不多做了, 达到目的就是好方法!

     nobile.amir@gmail.com

    这样 浏览器能访问你的服务器了, 先要能访问到你的项目,那就要把你的项目传上去设置好了,才可以!

    服务器是配置好了, 接下来要考虑 服务器的安全问题了, 真是一个很头疼的问题啊! 

  • 相关阅读:
    leetcode 131. Palindrome Partitioning
    leetcode 526. Beautiful Arrangement
    poj 1852 Ants
    leetcode 1219. Path with Maximum Gold
    leetcode 66. Plus One
    leetcode 43. Multiply Strings
    pytorch中torch.narrow()函数
    pytorch中的torch.repeat()函数与numpy.tile()
    leetcode 1051. Height Checker
    leetcode 561. Array Partition I
  • 原文地址:https://www.cnblogs.com/nobileamir/p/2568802.html
Copyright © 2011-2022 走看看