[Ubuntu]Ubuntu8.10をインストールしてみたよ。で、インストール設定メモ。[Linux] → [Ubuntu]Ubuntu8.10へVirtualboxをインストール。[Virtualbox]とまだ環境作りは続いとります。そろそろメンドイなぁと。
ということで、Ubuntu8.10へApache、PHP、MySQL、PostgreSQLをインストールしてローカルLAMP環境を作ります。
- Apache、PHP、MySQL、PostgreSQLをインストール。
# apt-get install php5 php5-mcrypt php5-imagick php5-xcache php5-pgsql php5-cli php5-sqlite php5-mysql php-pear php5-gd php5-cgi php5-curl php5-geoip apache2 mysql-client-5.0 mysql-server mysql-client mysql-admin postgresql postgresql-8.3-postgis pgadmin3
- PHP設定。
# vi /etc/php5/apache2/php.ini post_max_size = 8M ↓ post_max_size = 64M ##変更 magic_quotes_gpc = On ↓ magic_quotes_gpc = Off ##変更 upload_max_filesize = 8M ↓ upload_max_filesize = 64M ##変更
- Apache設定。
# mkdir /var/www/html # chown -R hoge.hoge /var/www ##hogeは適当な一般ユーザーへ # vi /etc/apache2/httpd.conf ServerName localhost:80 ## 追加 # vi /etc/apache2/site-available/default
<virtualhost *:80> ServerAdmin webmaster@localhost ServerName localhost DocumentRoot /var/www/html <directory /> Options FollowSymLinks AllowOverride None <directory /var/www/html> Options Indexes Includes ExecCGI FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </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 /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/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>
# a2enmod rewrite ## mod_rewriteを有効化 # /etc/init.d/apache2 restart
- ※UbuntuでのApacheのモジュールを有効化するには
# a2enmod < モジュール名>
というコマンドを使う。(< モジュール名>にはphp5、rewriteとかを指定)
- 逆にApacheのモジュールを無効化するには
# a2dismod < モジュール名>
というコマンドを使う。
- ※UbuntuでのApacheのモジュールを有効化するには
- MySQL設定。
# vi /etc/mysql/my.cnf ##[mysqld]の項目へ追加 character-set-server = utf8 collation-server = utf8_unicode_ci init-connect = 'SET NAMES utf8' skip-character-set-client-handshake ##[mysqldump]の項目へ追加 default-character-set = utf8 ##[mysql]の項目へ追加 default-character-set = utf8 # /etc/init.d/mysql restart
- PostgreSQL設定。
# passwd postgres ##postgresユーザーのパスワードを設定。 # su postgres $ psql template1 template1=# alter user postgres with password '******'; ## ******は適当なパスワードを設定。 template1=# \q ## \qで終了。 $ createuser -AdPE hoge ## hogeは適当な一般ユーザーへ。一般ユーザへのデータベース作成権限設定。 $ vi /etc/postgresql/8.3/main/postgresql.conf listen_addresses = 'localhost' ↓ listen_addresses = '*' ##'*'へ変更。 $ vi /etc/postgresql/8.3/main/pg_hba.conf ##以下をファイル最下部へ追加。192.168.11.1は各自ネットワーク環境へ。 local all all trust host all all 192.168.11.1 255.255.255.255 trust host all all 0.0.0.0 0.0.0.0 password crypt $ exit # /etc/init.d/postgresql-8.3 restart
これで、とりあえずローカル開発環境作りは終わりにしておきます。疲れたんで。これでCakePHPをぶち込んでローカルで開発出来るよ。これで仕事出来るよ。でも仕事無いよ。誰か仕事ちょーだいよ。
RubyとかRailsなんかも入れないとね・・・ま、そのうちということで。
- Newer: [Ubuntu]Ubuntu8.10へDropboxをインストールしたよ。真似したんですけどね。[Dropbox]
- Older: [Ubuntu]Ubuntu8.10へVirtualboxをインストール。[Virtualbox]
Trackbacks:3
- Trackback URL for this entry
- http://ore.saizensen.net/archives/122/trackback
- Listed below are links to weblogs that reference
- [Ubuntu]Ubuntu8.10へApache、PHP、MySQL、PostgreSQLをインストールする。[LAMP] from おれ最前線ねっと
- pingback from おれ最前線ねっと - [Ubuntu]Ubuntu8.10でPostGISを使えるようにする。[PostGIS] 08-11-27 (木) 2:00
-
[...] Postgresの設定は[Ubuntu]Ubuntu8.10へApache、PHP、MySQL、PostgreSQLをインストールする。[LAMP]でも参照して下さい。 [...]
- pingback from おれ最前線ねっと - [CentOS]CentOS5の「PHP、MySQL、PostgreSQL」のバージョンをYumでアップデートする。 08-11-27 (木) 2:08
-
[...] [Ubuntu]Ubuntu8.10へApache、PHP、MySQL、PostgreSQLをインストールする。[LAMP] [...]
- trackback from crazy(){for;;{you();}}: むげんループでキミにムチュウ 09-03-17 (火) 14:01
-
SQLAlchemy + MySQLでUnicodeの問題を解決
結構大変だったから覚書。手順としては MySQLのコーディングを変更する SQLAlchemyで?charset=utf8を渡してエンジン作成 SQLAlchemyで{’mysql_charset’:’utf8’}をすべてのテーブルで指定 の三段階 My…




