0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Coreserverでの仮想環境づくり(諦めました)

Posted at

Djangoを利用してWebアプリを作ってみよう。
ということで、もう作るものは決まってるので、借りてるCoreserverにインストールしてその環境で作ってみます。

とりあえず、場所は以下。

 [python 2系]
 #!/usr/local/bin/python
 [python 3系]
 #!/usr/local/bin/python3 

環境の現状確認。コマンドはこちら
http://petitbit.blogspot.com/2012/05/coreserverpip.html

[p2nd@s99 ~]$ pip --version
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)
[p2nd@s99 ~]$ python --version
Python 2.7.5
[p2nd@s99 ~]$ 

おろ?2系がデフォなわけね。

【参考】
・レンタルサーバにインストールする手順
http://ytaro-wps.blogspot.com/2017/08/xrea-django.html

・pythonの仮想環境どれつかえばいいの?
https://qiita.com/shibukawa/items/0daab479a2fd2cb8a0e7

なんかvirtualenvが良いらしい。
・リンクも充実。良記事。
https://qiita.com/Kodaira_/items/feadfef9add468e3a85b
・いろいろまとめ(長所、短所)
http://www.zopfco.de/entry/2017/04/03/233811

ということで、pyenv+virtualenv
でいきます。

あと、諸々あとで環境コピーとかしたいので、Docker使います。

CoreServerは、SUSELinux

[p2nd@s99 etc]$ uname -a
Linux s99.coreserver.jp 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

違うじゃないかw

Docker公式のインストール手順

さて、sudo,root権限がないので、apt-getが使えない。。。
ソースゲットしてビルドしてみる。

local/bin

のフォルダ作って

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
[p2nd@s99 bin]$ sh get-docker.sh
# Executing docker install script, commit: 36b78b2
+ su -c 'yum install -y -q yum-utils'
Password: 
su: Authentication failure

あれ、SSH用のパスワードじゃ動かんのか。。。

gitからインストールする方法もあったので試してみる。
http://d.hatena.ne.jp/embedded/20140626/p1
https://inokara.hateblo.jp/entry/2015/09/25/153841
https://qiita.com/kohga/items/0a8defe4fa9bf09a2177

[p2nd@s99 docker]$ pwd
/virtual/p2nd/local/bin/docker

よーわからんのでbin以下にフォルダ作成

[p2nd@s99 docker]$ git clone https://github.com/docker/docker-ce.gitCloning into 'docker-ce'...
remote: Counting objects: 359410, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 359410 (delta 3), reused 13 (delta 0), pack-reused 359388
Receiving objects: 100% (359410/359410), 144.42 MiB | 16.61 MiB/s, done.
Resolving deltas: 100% (184345/184345), done.
[p2nd@s99 docker]$ cd docker-ce/
[p2nd@s99 docker-ce]$ make deb

途中で引っかかった。proxy errorだとか

、、、

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?