• LAMP on ubuntu12.04 PHP, Apache2, MySQL, Linux ( with phpmyadmin installed)


    there are several procedure which include:

    1. Install the packages

    sudo apt-get install php5 php5-gd php5-cgi php5-mysql libapache2-mod-php5 apache2 mysql-client mysql-server -y

    2. Configure the mysql database password if necessary

    3.edit file 

    /etc/apache2/sites-available

    touch /etc/apache2/sites-available/mysite

    ---

    put something like this in the file 'myfile':

    <VirtualHost *:80>                                                                                                            
            ServerAdmin webmaster@localhost                                                                                       
                                                                                                                                  
            DocumentRoot /var/www                                                                                                 
            DirectoryIndex index.html index.php index.htm                                                                         
            <Directory />                                                                                                         
                    Options FollowSymLinks                                                                                        
                    AllowOverride None                                                                                            
            </Directory>                                                                                                          
            <Directory /var/www/>                                                                                                 
            <Files *.html,*.htm,*.php>                                                                                            
                    Options Indexes FollowSymLinks MultiViews                                                                     
                    AllowOverride None                                                                                            
                    Order deny,allow                                                                                              
                    allow from all                                                                                                
                    </Files>                                                                                                      
            </Directory>                                                                                                          
                                                                                                                                  
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/                                                                               
            <Directory "/usr/lib/cgi-bin">                                                                                        
                    AllowOverride None                                                                                            
                    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch                                                            
                    Order allow,deny                                                                                              
                    Allow from all                                                                                                
            </Directory>                                                                                                          
                                                                                                                                  
            ErrorLog ${APACHE_LOG_DIR}/error.log                                                                                  
                                                                                                                                  
            # Possible values include: debug, info, notice, warn, error, crit,                                                    
            # alert, emerg.                                                
            LogLevel warn                                                                                                         
                                                                                                                                  
            CustomLog ${APACHE_LOG_DIR}/access.log combined                                                                       
                                                                                                                                  
        Alias /doc/ "/usr/share/doc/"                                                                                             
        <Directory "/usr/share/doc/">                                                                                             
            Options Indexes MultiViews FollowSymLinks                                                                             
            AllowOverride None                                                                                                    
            Order deny,allow                                                                                                      
            Deny from all                                                                                                         
            Allow from 127.0.0.0/255.0.0.0 ::1/128                                                                                
        </Directory>                                                                                                              
                                                                                                                                  
    </VirtualHost> 

    4.restart the apache2 service using:

    service apache2 reload

    5.write the first PHP page:

    $ cat > /var/www/phpinfo.php << EOF
    <?php
    phpinfo();
    ?>
    EOF

    6. using the browser to check the page out!

    Input your site and the pages

    http://your_site_ip/phpinfo.php

    Then you will see something like this:

    7. install phpMyAdmin 

    wget -c http://dlsw.baidu.com/sw-search-sp/soft/26/14218/phpMyAdmin-4.1.4-all-languages.3715384168.zip -O /tmp/phpMyAdmin-4.1.4-all-languages.zip
     unzip /tmp/phpMyAdmin-4.1.4-all-languages.3715384168.zip -d /var/www
    mv phpMyAdmin-4.1.4-all-languages/ sqladmin # for secure reason coz there could be some blackcat miu scanning, you know.

    8. open the page there:

    http://your_site_ip/sqladmin

    you would see:

    and login then,

  • 相关阅读:
    JS使用readAsDataURL读取图像文件
    python20个骚操作
    HTML标签的for属性
    进程、线程、协程理解
    mysql 深度解析auto-increment自增列"Duliplicate key"问题
    2020年MySQL数据库面试题总结(50道题含答案解析)
    如何用Redis统计独立用户访问量
    Redis中的布隆过滤器及其应用
    redis系列教程以及面试题
    大厂面试爱问的「调度算法」,20 张图一举拿下
  • 原文地址:https://www.cnblogs.com/spaceship9/p/3843754.html
Copyright © 2020-2023  润新知