zoukankan      html  css  js  c++  java
  • linux apm环境搭建

    1.1安装Apache 
    yum install httpd httpd-devel
    安装完成后,用/etc/init.d/httpd start 启动apache
    设为开机启动:chkconfig httpd on
     
    1.2 安装mysql 
    1.2.1 yum install mysql mysql-server mysql-devel
    同样,完成后,用/etc/init.d/mysqld start 启动mysql
    1.2.2 设置mysql密码
    mysql>; USE mysql;
    mysql>; UPDATE user SET Password=PASSWORD(‘newpassword’) WHERE user=’root';
    mysql>; FLUSH PRIVILEGES;
    1.2.3 允许远程登录
    mysql -u root -p
    Enter Password: <your new password>
    mysql>GRANT ALL PRIVILEGES ON *.* TO ‘用户名’@’%’ IDENTIFIED BY ‘密码’ WITH GRANT OPTION;
    完成后就能用mysql-front远程管理mysql了。
    1.2.4 设为开机启动
    chkconfig mysqld on
    2. 安装php 
    yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
    /etc/init.d/httpd start
    3. 测试一下 
    3.1在/var/www/html/新建个test.php文件,将以下内容写入,然后保存。
    <?
    phpinfo();
    ?>
    3.2 防火墙配置
    a.添加.允许访问端口{21: ftp, 80: http}.
    iptables -I RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT
    iptables -I RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
    b.关闭防火墙{不推荐}.
    service iptables stop
    c.重置加载防火墙
    service iptables restart
  • 相关阅读:
    对比使用Charles和Fiddler两个工具及利用Charles抓取https数据(App)
    Charles-安装和配置
    python算法-队列
    python算法-快速排序
    【Codeforces】383.DIV2
    static关键字
    UNIX环境高级编程--5
    【LeetCode】467. Unique Substrings in Wraparound String
    typedef关键字
    strcpy 和 memcpy自实现
  • 原文地址:https://www.cnblogs.com/yutaoyao/p/4223637.html
Copyright © 2011-2022 走看看