WEB系技術電脳日記 -238ページ目

茨城到着(´・ω・)ス

photo:01



茨城到着(´・ω・)ス
とっと作業終わらせて帰る(´・ω・)ス



iPhoneからの投稿

再び茨城へ

photo:01



都内でも作業完了(´・ω・)ス
再び茨城へ向かう。
ちと秋葉原経由して行く(´・ω・)ス



iPhoneからの投稿

一服(´・ω・)ス

photo:01



北千住から千代田線に乗り換え。
ついでに一服(´・ω・)ス



iPhoneからの投稿

移動(´・ω・)ス

photo:01



今日は朝から茨城にて作業。
そして一度、都内へ。
また茨城に戻りと...

この数日さえ乗り切れば!
そう、乗り切れば....かゆ....うま



iPhoneからの投稿

制御システム(´・ω・)ス

photo:01



ここ数日、制御システム絡み
激しくレトロで制約の多い。
それも昨日でやっと完了(´・ω・)ス

今日からC#とweb言語に戻れる(´・ω・)ス

辛い作業だった(´・ω・)ス



iPhoneからの投稿

朝(´・ω・)ス

photo:01







iPhoneからの投稿

流れよ我が涙、とジャンクサーバは言った(´・ω・)ス アップロード環境

WEB系技術電脳日記-流れよ我が涙、とジャンクサーバーは言った
引き続き(´・ω・)スさっそく、PHP絡みの開発で使うが、
未だルートはDocumentRoot "/var/www/html"のままなので、
いずれバーチャルドメインになるが、
まずはここにFTPでアクセスさせるようにしとく。
開発用サーバと実際にコード書く環境が違うから(´・ω・)ス

# vi /etc/vsftpd/vsftpd.conf 

vsftpの環境ファイル編集



100行目 chroot_list_enable=YES
    

コメントアウト外してディレクトリ上に行けるリスト用意


102行目 chroot_list_file=/etc/vsftpd/chroot_list
   

そのリストの場所(´・ω・)ス



早速リストを確認
ちなみにデフォで無いので、そのまま放置すると、
500 OOPS: could not read chroot() list file:/etc/vsftpd/chroot_list
500 OOPS: priv_sock_get_result
とかなる(´・ω・)ス
vi /etc/vsftpd/chroot_list で書き始める(´・ω・)ス
記入はユーザー名をダラダラ改行記述

ちなみにスーパーデーモンで、
service xinetd restart
と再起動しなくても行けた。
まぁ・・接続毎に起動だから当たり前(´・ω・)ス
そんな記録(´・ω・)ス

流れよ我が涙、とジャンクサーバは言った(´・ω・)ス MySQL

WEB系技術電脳日記-流れよ我が涙、とジャンクサーバーは言った

引き続き構築(´・ω・)ス

PHP動作確認して、MySQLぶち込む(´・ω・)ス

早速、構築ってからにはサイト作らにゃ意味がない。
まずはルートフォルダの確認。
Apacheのルート設定は、/etc/httpd/conf/httpd.conf内、
292行目に DocumentRoot "/var/www/html"
さっそく何かPHPファイルをぶち込む

vi index.php
<?php echo date("Y/m/d"); ?>
問題なく動いている模様。

次はMySQLをぶち込む
# yum -y install mysql-server

[root@localhost html]# yum -y install mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
adobe-linux-x86_64 | 951 B 00:00
base | 3.7 kB 00:00
extras | 3.5 kB 00:00
updates | 3.5 kB 00:00
Setting up Install Process
Package mysql-server-5.1.66-2.el6_3.x86_64
already installed and latest version
Nothing to do
そうだ、バージョン確認時、入れてあったな・・。
設定ファイルを確認ずら
/etc/my.cnf が設定らしい。

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
character-set-server = utf8 ←追加、文字化け対策でUTF8に。

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
ちなみに[mysqld_safe]はなんだろうと調べると、
監視してるデーモンで、動きを渡してると。
ほぅ・・・
参照:
http://open-groove.net/mysql/mysqld-mysqldsafe/
http://www.insight-tec.com/mailmagazine/mysql/091118.html

では、早速起動(´・ω・)ス

# /etc/rc.d/init.d/mysqld start
MySQL データベースを初期化中: Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

[ OK ]
mysqld を起動中: [ OK ]
さて、自動起動に
# chkconfig mysqld on

次に初期設定(´・ω・)ス
# mysql_secure_installation




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
初期パスワードは設定されていないので、そのまま[Enter]

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y 匿名ユーザ消しますか? 
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y リモートからのrootログイン禁止しますか?
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y テストのデータベース削除しますか?
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]  
  ※ユーザ権限が保存されているテーブルをリロードするかどうか。Enterを押(´・ω・)ス
... Success!

Cleaning up...



All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

もう一回できるのか?テストするとパスワード入れ直せばおk

さて、確認(´・ω・)ス

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.1.66 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> exit
Bye
おk(´・ω・)ス

流れよ我が涙、とジャンクサーバは言った(´・ω・)ス ServerName

WEB系技術電脳日記-流れよ我が涙、とジャンクサーバーは言った

引き続き構築(´・ω・)ス

Apacheを再起動させると、
httpd: Could not reliably determine the server's fully qualified domain name,
using localhost.localdomain for ServerName
とかエラーを吐く。

確実なサーバの完全修飾ドメイン名を決定することができなかったとの事。
要は、Apacheの設定ファイルに、サーバーネームの欄がコメントアウトされていて、
ちゃんと名前書けよゴラァされているというもの。
やっつけ開発用サーバにありがち。
Apache自体は動くが、やはりエラーは良くないので直す(´・ω・)ス

直すファイルは、Apacheの環境ファイル
/etc/httpd/conf/httpd.conf の
276行目 #ServerName www.example.com:80
これを、
         ↓
276行目 #ServerName www.example.com:80
277行目 ServerName www.localhost.localdomain:80 ←追加

え?ちゃんとドメイン振れ?開発鯖にドメインなんか振らない(´・ω・)ス
hostsに書くのも面倒。
外部公開すれば振る(´・ω・)ス
そんな記録。

無駄な回線という記録(´・ω・)ス

ちと取引先に紹介されて1台ノート納品で、
その回線も見てほしいとの事で、
今日は出撃した(´・ω・)ス

・・・・で、見てみると、
地元のケーブルテレビ会社のインターネット回線、
それとチューナーが入っていてテレビでBS見れるプランになっている模様。
だが、別にNTTの光回線が入っており、良く分からない仕様。

結論から書けば、以前取引していた事務機屋に
回線をぶち込まれ、ずっと使ってるケーブル会社も、
プランが新しく早い&安くなってるのに、
提案も改善も無しで放置プレイを決められていた模様。
そんな訳で週明けにNTT召喚して対応することにする。
テレビも見れるようになっていたが、
これは光テレビに切り替えさせてもらう。

ケーブル会社の営業も、もう少し頑張ればいいのに・・・
そう考えた土曜の夕方の記録(´・ω・)ス