fc2ブログ

2014-05-18(Sun)

JDK 1.8をインストール Ubuntu14.04LTS

Ubuntu Version確認

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty



JDK 1.8のインストール

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get -y install oracle-java8-installer
$ sudo apt-get -y install oracle-java8-set-default
$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)


スポンサーサイト



2014-04-13(Sun)

Vagrant boxセットアップ(1) Ubuntu12.04 LTS

最終的にこれがしたい。
Ubuntu 12.04 Vagrant + Laravel4.1 + PHP 5.5.
基本的なパッケージのインストールが終わったのでやっとlaravel-boxのインストール。

$ git clone git://github.com/HiroKws/Laravel4-Vagrant.git



$ cd Laravel4-Vagrant/
$ vagrant up
Bringing machine 'laravel4' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The 'extra' flag on synced folders is now 'mount_options'


上記エラーが発生した。
原因は./wwwのパーミッション設定らしい。
以下のとおり修正すると動く。

$ vim Vagrantfile
(修正前)
lv4_config.vm.share_folder("www", "/var/www", "./www", :extra => 'dmode=777,fmode=777')
(修正後)
lv4_config.vm.share_folder("www", "/var/www", "./www", :mount_options => ["dmode=777","fmode=777"])
config.vm.share_folder("./www",:mount_options => ["dmode=777","fmode=777"])


初回Vagrant upは結構時間がかかる。仮想Boxイメージを取得するらしい。


参考:
【Vagrant】The 'extra' flag on synced folders is now 'mount_options'の対処法
RCMS開発日誌
[AWS][DevOps] Vagrant+Chef Solo+BerkshelfでEC2インスタンスにnginxを入れる

2013-11-24(Sun)

Ubuntu 12.04LTS pythonbrew install 2.7.5でERROR: Failed to install setuptools.

Ubuntuへpythonbrewをインストールして$Homeにpython2.7.5をインストールしようとしたら
distributeでエラーが発生した。

まずは環境から

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise



エラー状況

$ pythonbrew install 2.7.5
...........
ERROR: Failed to install setuptools. See /home/keisuke/.pythonbrew/log/build.log to see why.
Skip installation of setuptools.

# エラーログ確認
$ vim /home/keisuke/.pythonbrew/log/build.log
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
5772 Traceback (most recent call last):
5773 File "distribute_setup.py", line 556, in
5774 sys.exit(main())
5775 File "distribute_setup.py", line 552, in main
5776 tarball = download_setuptools(download_base=options.download_base)
5777 File "distribute_setup.py", line 211, in download_setuptools
5778 src = urlopen(url)
5779 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 127, in urlopen
5780 return _opener.open(url, data, timeout)
5781 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 410, in open
5782 response = meth(req, response)
5783 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 523, in http_response
5784 'http', request, response, code, msg, hdrs)
5785 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 442, in error
5786 result = self._call_chain(*args)
5787 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 382, in _call_chain
5788 result = func(*args)
5789 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 629, in http_error_302
5790 return self.parent.open(new, timeout=req.timeout)
5791 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 404, in open
5792 response = self._open(req, data)
5793 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 427, in _open
5794 'unknown_open', req)
5795 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 382, in _call_chain
5796 result = func(*args)
5797 File "/home/keisuke/.pythonbrew/pythons/Python-2.7.5/lib/python2.7/urllib2.py", line 1247, in unknown_open
5798 raise URLError('unknown url type: %s' % type)
5799 urllib2.URLError:



対応
いろいろインストールが必要らしい

$ sudo apt-get install build-essential
$ sudo apt-get install libncursesw5-dev
$ sudo apt-get install libreadline-gplv2-dev
$ sudo apt-get install libssl-dev
$ sudo apt-get install libgdbm-dev
$ sudo apt-get install libbz2-dev
$ sudo apt-get install libc6-dev
$ sudo apt-get install libsqlite3-dev
$ sudo apt-get install tk-dev


リトライ

pythonbrew install 2.7.5
Downloading Python-2.7.5.tgz as /home/keisuke/.pythonbrew/dists/Python-2.7.5.tgz
######################################################################## 100.0%
Extracting Python-2.7.5.tgz into /home/keisuke/.pythonbrew/build/Python-2.7.5

This could take a while. You can run the following command on another shell to track the status:
tail -f "/home/keisuke/.pythonbrew/log/build.log"

Installing Python-2.7.5 into /home/keisuke/.pythonbrew/pythons/Python-2.7.5
Downloading distribute_setup.py as /home/keisuke/.pythonbrew/dists/distribute_setup.py
######################################################################## 100.0%
Installing distribute into /home/keisuke/.pythonbrew/pythons/Python-2.7.5
Installing pip into /home/keisuke/.pythonbrew/pythons/Python-2.7.5

Installed Python-2.7.5 successfully. Run the following command to switch to Python-2.7.5.
pythonbrew switch 2.7.5

2013-11-20(Wed)

Ubuntu 12.04LTS chkconfigで/sbin/insserv: No such file or directory

apache2を自動起動するときにエラーが発生したので対応した。

まずはバージョン確認

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise



エラー内容

$ chkconfig apache2 off
/sbin/insserv: そのようなファイルやディレクトリはありません



対策
リンクがないなら付けてあげたらいいらしい。

$ cd /sbin
$ ln -s ../usr/lib/insserv/insserv



まあ、最新版Ubuntuはchkconfigじゃなくsysv-rc-confだけどね。

参考URL
chkconfig complains about /sbin/insserv

2013-02-18(Mon)

An internal error occurred during: "Updating Maven Project"

SpringのMavenプロジェクトで以下のエラーが出た時の対応をメモる。
基本はここ(An internal error occurred during: "Updating Maven Projec)を参照した。

なぜかそのままではうまくいかず以下の通りするとうまくいった。

1. Right-click on your project, select Maven -> Disable Maven Nature.
2. Open you terminal, go to your project folder and do “mvn eclipse:clean”
3. F5(refresh)
4. Right-click on your project, Maven -> Update Project




プロフィール

kumagonjp2

Author:kumagonjp2
Python,Django,R,Mongo,MySQL,Struts,Spring,データマイニングなどサーバー関係のメモを残していきます。

最新記事
最新コメント
最新トラックバック
月別アーカイブ
カテゴリ
雪が3Dで降るブログパーツ ver2

マウスで見る方向変えられます

検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QR