Posts

Showing posts with the label Linux

Build JupyterNotebook(Anaconda) environment in AWS EC2

Key words: JupyterNotebook, Anaconda, AWS, EC2, Proxy, Winscp, Putty, DeepLearning <Background> The company employs a proxy server, through which all external connections must pass. Company computers utilize Virtual Desktop Infrastructure (VDI), restricting the installation of large software such as Anaconda. <Task> As a Deep Learning engineer, it is necessary to set up a Jupyter Notebook environment on AWS cloud. However, services like SageMaker are costly, thus requiring a self-built environment on AWS EC2. <AWS EC2 Configuration> Create an EC2 Instance with the following specifications: AMI: Ubuntu/Amazon Linux 2 AMI CPU: t3.large VPC: Public subnet with an Internet Gateway (IGW) Elastic IP: Required, as dynamic IP addresses are prone to firewall interception. Security Group: Inbound ports 8081 (Jupyter) and 22 (SSH) should be open; all outbound ports should be accessible. Storage: Minimum of 16GB, as Anaconda alone requires 9GB. Key Pair: Generate an RSA key pair,...

AWS Notes - Network - TransferFamily(Transfer) connect with EFS

1. AWS EC2 connects to EFS create EFS and create EC2 EFS's DNS:fs-XXXXXXX.efs.ap-northeast-1.amazonaws.com add security group add nfs port(2049) to EFS inbound rules (IP: EC2's local IP) use the command below to mound the EFS to EC2 a. install efs tools sudo yum install amazon-efs-utils b.mount the EFS sudo mount -t efs -o tls fs-XXXXX:/ ~/efs-mount 2. Create Transfer Create transferFamily's Endpoint Protocols: SFTP Identity Provider: Service Managed Endpoint : s-XXXXXXXXX.server.transfer.ap-northeast-1.amazonaws.com Endpoint Type: Public 3. Create User to connect Transfer to EFS Create a role to connect transfer to EFS a.Create Policies { "Version": "2012-10-17", "Statement": [ { "Sid": "GrantTransferRoleAccess", "Effect": "Allow", "Action": [ "elasticfilesystem:ClientRootAccess", "elasticfilesystem:ClientWrite", "elasticfilesystem:ClientMount" ], "Resource...

Install the Google Play Android App in Kindle & Xiaomi

You have to install the app below. ①Google Account Manager ②Google Service Framework ③Google Play Developer Service ④Google Play Store The App can be download in apkmirrot https://www.apkmirror.com/

Install Ubuntu 18 in Thinkpad X1 Carbon (Dual boot)

1.Download the Ubuntu 18.04.01 (About 1Gb). 2.Burn the Ubuntu 18 to a DVD (Use the outsite DVD-ROM). 3.Enter to BIOS, a. Disable Secure Boot b. Enable Thunderbolt Save and Exit 4.[BitLocker recovery keys] should be used when restarted Computer by disabling secure boot. The key can be found in [https://account.microsoft.com/devices/] by using Microsoft Account 5.Enter to BIOS, make [boot from DVD-ROM] is prior to [Windows Boot Manager], Save and Exit. 6.Reboot the System. Start from DVD-ROM. 7.Install Ubuntu 18. 8.Do not connect to the Wifi, because the intel wireless LAN Adapter 7260 driver is wrong. 9.Installation type: Select [Something else] Make a partition, my partition is /boot : 1Gb,logical,ext4 / : 70Gb,logical,ext4 swap : 20Gb,logical,swap (SQRT(16) + 16 = 20G memory:16G) /home : 52Gb,logical,ext4 10.Create the User id and password. 11.Install. ----------------------------------------------- 12.Reboot the computer, MBR becomes Ubuntu 18. 13.If you want to enter Windows 10, the...

Set root password in Ubuntu

MyUser@MyUser-Ubuntu:~$ sudo passwd [sudo] password for MyUser: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully MyUser@MyUser-Ubuntu:~$

Change Mysql Password in Ubuntu (Forget Password)

Version: Ubuntu: 14 MySQL: 5.5 1.Change the MYSQL Parameter: sudo vi /etc/mysql/my.cnf 32 # 33 # * Basic Settings 34 # 35 user = mysql 36 pid-file = /var/run/mysqld/mysqld.pid 37 socket = /var/run/mysqld/mysqld.sock 38 port = 3306 39 basedir = /usr 40 datadir = /var/lib/mysql 41 tmpdir = /tmp 42 lc-messages-dir = /usr/share/mysql 43 skip-external-locking Add "skip-grant-tables" 32 # 33 # * Basic Settings 34 # 35 user = mysql 36 pid-file = /var/run/mysqld/mysqld.pid 37 socket = /var/run/mysqld/mysqld.sock 38 port = 3306 39 basedir = /usr 40 datadir = /var/lib/mysql 41 tmpdir = /tmp 42 lc-messages-dir = /usr/share/mysql 43 skip-external-locking 44 skip-grant-tables 2.Restart mysql: sudo service mysql restart 3.Change mysql Password: use mysql describe user; select host, user, password from user; upd...

A better solution to the ubuntu problem “Not enough free disk space when upgrading”

Use the commands: sudo apt-get update sudo apt-get dist-upgrade It will ignore the problem of “Not enough free disk space when upgrading” Maybe the disk volume calculation methods are different.(Because update methods are different?)

Related to Mysql

Services: start: sudo /etc/init.d/mysql start stop: sudo /etc/init.d/mysql stop restart: sudo /etc/init.d/mysql restart // Apache /etc/init.d/apache2 start /etc/init.d/apache2 restart /etc/init.d/apache2 stop

A good solution to the ubuntu problem "Not enough free disk space when upgrading"

A good solution to the ubuntu problem "Not enough free disk space when upgrading" Reference: http://askubuntu.com/questions/298487/not-enough-free-disk-space-when-upgrading

Install Android Studio in Ubuntu 14

I have installed eclipse for C++ development and Java development in Ubuntu 14.04. But these days, I prefer to install the android development environment。 Compared to Eclipse, Android Studio offers official development environment. So I install this software. I have already installed Java 1.8. Reference: 1.http://karuppuswamy.com/wordpress/2013/10/23/how-to-install-android-studio-in-ubuntu-linux-13-10/ 2.http://simpledeveloper.com/adb-not-responding-android-solution/ 3.http://blog.csdn.net/niuls/article/details/37868079 The steps to install Android Studio. Step 1: Download Android Studio from Android Developer Portal(developer.android.com/sdk/index.html). Step 2: Install Android Studio. Extracting the the downloaded package to /opt/. Because of the China Gov's firewall, the google's host address should be added. For example, You can find google's host address in this site(http://ping.chinaz.com/) and add an effective one to /etc/hosts $ sudo vi /etc/hosts. and add the addr...

Ubuntu Error Solution: Not enough free disk space when upgrading

Reference: http://askubuntu.com/questions/298487/not-enough-free-disk-space-when-upgrading

Install Android Studio in Ubuntu 14

1. Download the android-studio-ide-135.1641136-linux.zip from the "http://developer.android.com/sdk/index.html" 2.Extract the zip file. 3.Move the file to the /opt/ by using "sudo mv android-studio /opt/" 4.Enter the /opt file start installation by using "./android-studio/bin/studio.sh" 5.Then the installation will start.

Install cdt 8.4.0 in eclipse luna

If you installed eclipse, you can install cdt to develop C program. You have to finish the installment of Eclipse. (Reference: http://hi.baidu.com/sf_chipan/item/e38ed5db1378666bdcf9be3f) Go into the website: http://www.eclipse.org/cdt/downloads.php Find the software repository url of related eclipse, such as: http://download.eclipse.org/tools/cdt/releases/8.4 Then open eclipse luna, select "help", and "install new software". then select "Add", the "Name" is "cdt", the location is the "repository url" Then you can add the cdt. What's more, you should install g++ For example: “sudo apt-get install g++”

The software I have installed on Ubuntu

The software I have installed on Ubuntu: (OK)1.Google Chrome (OK)2.Apache 2.4.29 (/usr/sbin/apachectl -v) (OK)3.Mysql 5.5.38 4.Input: fcitx, fcitx-sogou, fcitx-anthy (OK)5.Vim (Full) (OK)6.Java OpenJDK 8 and Java 8 sudo apt install openjdk-8-jdk sudo add-apt-repository ppa:webupd8team/java sudo apt update sudo apt install oracle-java8-set-default sudo update-alternatives --config java (OK)7.Eclipse 201809 JavaSE (OK)8.Eclipse Plugin CDT 9.5.4 (OK)9.Gcc 7.3.0, Make 4.1 (sudo apt-get install build-essential) (OK)10.FileZilla 3.28.0 (sudo apt install filezilla) (OK)11.powertop 2.9 (sudo apt install powertop) 12.git 1.9.1 (not config) (OK)13.KVM (Refer to: http://sharadchhetri.com/2014/10/09/install-kvm-kernel-based-virtual-machine-ubuntu-14-04-lts-desktop/) (OK)14.Wireshark (Configure method refer to: http://www.cnblogs.com/ddtpower/archive/2012/12/20/ubuntu_wireshark_dumpcap.html) 15.Android Development Environment 1.0.1 16.Goagent 3.1.21 (OK)17.Visual Studio Code ...

install/start/restart/stop apache and mysql

#####Install mysql: $ sudo apt-get install mysql-server mysql-client "after install, you should set the root password" #####Install Apache: $ sudo apt-get install apache2 and use Chrome to see "http://localhost" #####start/restart/stop Apache $ sudo /etc/init.d/apache2 start $ sudo /etc/init.d/apache2 restart $ sudo /etc/init.d/apache2 stop #####start/restart/stop Mysql $ sudo /etc/init.d/mysql start $ sudo /etc/init.d/mysql stop $ sudo /etc/init.d/mysql restart

Install Ubuntu 18 in Thinkpad X240s (Dual boot)

1.Download the Ubuntu 18.04.01 (About 1Gb). 2.Burn the Ubuntu 18 to a DVD (Use the outsite DVD-ROM). 3.Reboot the System. Start from DVD-ROM. 4.Install Ubuntu 18. 5.Do not connect to the Wifi, because the intel wireless LAN Adapter 7260 driver is wrong. 6.Make a partition, my partition is /boot : 1Gb,logical,ext4 / : 18Gb,logical,ext4 swap : 8Gb,logical,swap (same as memory) /home : 25Gb,logical,ext4 7.Select "Device for boot loader installation": the "/boot" disk that you just created. 8.Create the User id and password. 9.Install. 10.Reboot the computer, MBR is still the Windows. 11.Install the free software EasyBCD 2.2. 12.Click "Add New Entry", Select find "Linux" by "Grub2", Save. 13.Reboot the computer. You can enter the Ubuntu 18, by Windows MBR. 14.Use "apt-get update" to update the driver and software. 15.Install software. Now the Computer does not have any problem. The problem of Intel wireless LAN Adapter 2760 driver...

The Problem "The volume 'boot' has only 0 bytes disk space remaining"

Reference URL Question Statement: After a recent update by Ubuntu 12.04's "Update Manager", I'm getting an alert saying: The volume "boot" has only 0 bytes disk space remaining Solutions: 1. To see the current kernel in use: uname -r 2. To see the usage of the "/boot": df -h /boot 3. To see all installed kernels: Type sudo apt-get remove linux-image- and than press Tab twice. 4. Next remove some of the old Kernel, e.g.: sudo apt-get remove linux-image-3.2.0-27-generic-pae linux-image-3.2.0-29-generic-pae ... Don't delete all kernels! Only the old ones. In My case: There are: linux-image-3.11.0-15-generic linux-image-3.11.0-17-generic linux-image-3.11.0-18-generic linux-image-3.11.0-19-generic linux-image-3.11.0-20-generic linux-image-3.11.0-24-generic linux-image-3.11.0-26-generic linux-image-3.13.0-32-generic I had removed: linux-image-3.11.0-17-generic linux-image-3.11.0-18-generic linux-image-3.11.0-19-generic linux-image-3.11.0-20-generi...