linuxソースコードインストールmysql+apache+php+phpMyAdminメモ


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////tar.gz | tar -xvf -shell> cd mysql-VERSIONshell> ./configure --prefix=/usr/local/mysqlshell> makeshell> make installshell> cp support-files/my-medium.cnf/etc/my.cnfshell> cd/usr/local/mysqlshell> chown -R mysql .shell> chgrp -R mysql .shell> bin/mysql_install_db --user=mysqlshell> chown -R root .shell> chown -R mysql varshell> bin/mysqld_safe --user=mysql &
インストールに成功すると、[1]3879[root--1014--/usr/local/mysql]Starting mysqld daemon with databases from/usr/local/mysql/varのようなヒントも表示されます.ps-A|grep mysqlでmysqlがバックグラウンドで実行されたかどうかを確認することもできます.もちろん、/usr/local/mysql/binディレクトリにmysqlを入力してmysql>に入るとmysqlが正常にインストールされたことを示します.
shellでデータベース操作を行うためにコマンドを直接入力すればよいので、/usr/local/mysql/bin/ディレクトリにアクセスする必要はありません.ln-s/usr/local/mysql/bin/mysqladmin/usr/binln-s/usr/local/mysql/bin/mysql/usr/bin
また、ソースコードをコンパイルしてインストールmysqlは、パソコンが再起動するたびに、自分でmysqlを手動で再起動する必要があるため、mv share/mysql/mysqlをサービスと起動項目に追加する必要がある.server/etc/init.d/mysqlchmod 775/etc/init.d/mysqlchkconfig--add mysql(小注メモ:775はrwx rwx r-xを表す.r--4,w--2,x--1のため)
//////////////////////////////////////////////////////////////////ソースインストールapacheshell>./configure--prefix=/usr/local/apache shell>make shell>make install///ln-s/usr/local/apache/bin/apachectl/usr/bin/起動:shell>apachectl startテスト:127.0.0.1と入力するとIt Worksがapacheインストールに成功したことがわかります
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////configure--prefix=/usr/local/mysql--with- mmysqli=/usr/local/mysql/bin/mysql/usr/usr/usr/local/mysql/bin/usr/local/local/apache/apache/apache/bin/apxs--with- mysql=/bin/apxs--with- b/php.ini
phpとapacheの統合オープン/usr/local/apache/conf/http.confはapacheを次のように構成します#サイトとディレクトリDocumentRoot'/home/http/html/'#自分で設定(注:デフォルト設定を変更すると、その下のOptions FollowSymLinks AllowOverride None Order deny,allow Deny from allの[Deny from all]を[Allow from all]に変更します.そうしないと、テストページへのアクセスにforbiddenエラーが発生し、の[/xxx]を変更します.「以前に設定したDocumentRootに変更)
#インデックスディレクトリOptions FollowSymLinks MultiView#phpファイル接尾辞AddTypeアプリケーション/x-httpd-php.php.phtml.php 3.inc AddTypeアプリケーション/x-httpd-php-source.phps#apacheのデフォルトファイル名順を設定するかどうかを設定       DirectoryIndex   index.php   index.shtml   index.html   index.htm    
 
shell>apachectl restart
////////////簡単なphpファイルを書くテストhttp://127.0.0.1/xx.php
 
//////////////////////////////////////////////////////////phpMyAdminインストール
ソースコードを解凍してDocumentRootの下に置く
使用するコマンドの構成
cd phpMyAdminmkdir config                        # create directory for savingchmod o+rw config                   # give it world writable permissions
cp config.inc.php config/           # copy current configuration for editingchmod o+w config/config.inc.php     # give it world writable permissions
 
に入るhttp://xxx/phpMyAdmin/scripts/setup.php構成の可視化
 
 
長い間やっていたのか、入るたびにhttp://xxx/phpMyAdminを選択します.#1045 - Access denied for user 'root'@'localhost' (using password: NO) , http://xxx/phpMyAdmin/index.php ,