網頁

顯示具有 技術---Ubuntu 標籤的文章。 顯示所有文章
顯示具有 技術---Ubuntu 標籤的文章。 顯示所有文章

2014年11月16日 星期日

Ubuntu/Lubuntu --- How to free up /boot space

Today when I launch the software Updater and install the updated software on Lubuntu, the alert message tell me “Not enough free disk space” on disk /boot.ScreenHunter_410Even though I follow the suggestion to empty the trash an remove temporary packages by using the sudo apt-get clean command, the updated software still cannot be installed.

Thank friendly author to share the related knowledge on the Internet. Based on Google Search, I find out some information for me to resolve this problem. That is :
If the /boot partition size is full and the reason is the existing old kernel, maybe we will clean the old kernel images.
ScreenHunter_409
How to clear these old kernel images?
At first, we need to realize what the current kernel version is used by using the uname -r command.ScreenHunter_411next to list all the old kernels that we ever have installed it by using the dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' commandScreenHunter_412So do that we will know what version will be removed because the current kernel is not on these list.
Then we will begin to uninstall and delete these old kernel by using the dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt-get -y purge commandScreenHunter_414After do it, the /boot space will be free up now.ScreenHunter_415

2014年8月21日 星期四

Microsoft Azure --- Install & Configure the Azure Cross-Platform Command-Line on Ubuntu (Lubuntu)

I know we can set static IP on Azure VM IaaS by using the Azure PowerShell on windows platform, but I want to do the same action on my Linux workstation. Based on this reason, I refer to the Microsoft Azure Web Site and find out there is the Azure cross-platform command line as the PowerShell. So I study the related information and write down the related procedure as follows:

Install Node.js with NPM
At first, we will add the Launchpad PPA to Lubuntu 14.04 by executing the sudo add-apt-repository ppa:chris-lea/node.js command.ScreenHunter_380To downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies by using the sudo apt-get update command.ScreenHunter_381After adding the required PPA file and updating package lists, we will install Node.js with NPM package by running the sudo apt-get install nodejs command.ScreenHunter_383
Check Node.js and NPM version
To make sure that Node.js and NPM package are installed normally by typing the node --version commandScreenHunter_387and npm -v command
ScreenHunter_388
Install Azure Cross-Platform Command-Line Interface
Refer to the related document at this Microsoft URL http://azure.microsoft.com/en-us/documentation/articles/xplat-cli/ , we will install it by using the sudo npm install azure-cli -g command.ScreenHunter_389
Connect to the Azure subscription
To configure the xplat-cli to work with the Azure subscription, we have to firstly connect to the Azure subscription.
How to do it? The simple method is the organization account login to the Azure.
The login method only work with organizational account. If we are using a Microsoft account to login to the Azure subscription, we have to create a new user on Azure Active Directory so that this new user will be an organizational account.

Create an organizational account
If the default directory has already exist, we will directly create a new user by clicking ADD USER on Active Directory.ScreenHunter_390Due to we will create a new user belongs to the organization account, please select New user in your organization in TYPE OF USER and key in name in USER NAME.ScreenHunter_391In user profile dialog, we will key in some information as FIRST NAME, LAST NAME, DISPLAY NAME and select the User Role.ScreenHunter_392By clicking create button, the system will assign a temporary password for the organization user.ScreenHunter_393Please supply a legal email address for receiving this temporary password.ScreenHunter_394So does that the organizational account will be created now.ScreenHunter_395
Delegate Co-administrator role
In the management portal, select SETTINGS, Administrators and click Add button.ScreenHunter_397To key in the organization account with email address next to select one subscription.ScreenHunter_398So does that the organizational account can manage this Azure subscription now.ScreenHunter_399
Change password
At first, we have to change temporary password by clicking the hyperlink from mail or directly login to the Azure portal by using the organizational account.

So does that the system will redirect to another page for changing the password.ScreenHunter_402If the change process is successful, we can login to the Azure system now.
ScreenHunter_404
Execute the command line
After finishing the above method, we will login using an organizational account by using the azure login command.ScreenHunter_406
To log out the Azure, we can execute the azure logout command as follows:ScreenHunter_408
As to what functionality of this tool will be provided, we can refer to the Azure Official Web Site as this URL
http://azure.microsoft.com/en-us/documentation/articles/command-line-tools/

Although refer to this URL, I still don’t know how to set Static IP from Ubuntu. Maybe there is this function in the future, I guess.

Reference :
Due to npm now come with pre-packaged with Node.js ,we will get the error message if install it individually.
ScreenHunter_385

2014年6月15日 星期日

Ubuntu 13.10 --- How to run Google Apps on Linux platform by Genymotion emulator

Today, there are more and more apps available on Google Play Store but we cannot use it directly on our system as Windows, Linux or Mac platform. This is why we need to choose Genymotion application for emulating Android environment on our desktop.

The Genymotion product is a Virtual Android Environment built on x86 and Virtualbox environment. The good news is there is free version so that we can use it for testing Android environment as develop program or deploy system.
How to do it?
At first, we have to prepare the following prerequisites
(1). Java
     By default, the java package has already been install after install Ubuntu 13.10 Desktop Graphic environment.ScreenHunter_307(2). Android SDK
     Download and extract Android SDK on the personal computer.ScreenHunter_240(3). VirtualBox
     To check the repository and install it if we never have the VirtualBox package.ScreenHunter_205(4). CPU virtualization (VT-X on Intel processors and AMD-V on AMD processors) is enabled

After the above process is confirmed, we will begin to prepare the related action as follows:
Download Genymotion Source
For downloading source(free) from GenyMotion Web Site https://cloud.genymotion.com 
,we have to firstly login if there is the existing account or sign up if never exist one before.ScreenHunter_198This is my first time come here so that will create the new account by using the sign up form.ScreenHunter_199After the registration finish, the Genymotion system will send out a verification mail to my registered email.ScreenHunter_201If we got the mail next to press Click here hyperlink,ScreenHunter_202 the registered account will be activated so that it can download any source now.
ScreenHunter_203That is to select the right package according to the system as Ubuntu x64 next to download and save it on the favorite location.ScreenHunter_204
Install and Launch GenymotionAfter the download process is finished, we have to enable Allow executing file as Program on the terminal by using the chmod +x ./genymotion-2.2.0_x64.bin commandScreenHunter_206
To install the Genymotion software into the specified path as /opt by using the sudo ./genymotion-2.2.0_x64.bin -d /opt commandScreenHunter_211
To switch to the installed directory next to launch the Genymotion tool by using the ./genymotion commandScreenHunter_212So does that the Genymotion player will be run now.

Add and Create a new Virtual DeviceOn the first running, the system will remind you to download the virtual device if never add it before. When we press the Yes button, the virtual device creation wizard will be launched.ScreenHunter_213In the Virtual device creation wizard, we will click Connect button to go ahead the next step.ScreenHunter_214To key in the registered credential for connecting to Genymotion cloudScreenHunter_215So do that the available virtual devices will show up.ScreenHunter_216In the moment, I will chose “Google Nexus 7 - 4.2.2 - API 17 - 800x1280” device next to click Next buttonScreenHunter_281To click Next buttonScreenHunter_282The image download will take quite a while depending on the Internet bandwidth.ScreenHunter_283To click Finish button if the virtual device is created successfully.ScreenHunter_284So does that the new virtual device will be added now.ScreenHunter_286
Start Virtual DeviceTo click the Play button for starting the Android phone emulator.ScreenHunter_287The process is starting virtual deviceScreenHunter_288Once the process is completed, the android phone will boot up normally.ScreenHunter_268
Due to the license issue, the ARM Translation and Google Play Apps is not available in this Genymotion emulator by default. So that we have to download some files as ARM Translation Installer and the correct Google Apps version from Google Apps (# 1)

Once the download is completed, we will drag & drop these files into the emulator.
At first, we will drag & drop Genymotion-ARM-Translation_v1.1.zip into the Genymotion VM.ScreenHunter_295After “File transfer in progress” finish, it will ask us whether want to flash it on Genymotion. To click OK button to go ahead.ScreenHunter_296Once this file has been flashed successfully, we need to reboot the virtual device right now.ScreenHunter_297Although we have already requested this VM to reboot, it still need to do it manually by using the adb reboot command.
Otherwise, the flash process will fail if directly close the VM window, not do the command!ScreenHunter_279Once the HomeScreen show up, please drag & drop the right version as gapps-jb-20130812-signed.zip into the Genymotion VM again.ScreenHunter_300To click OK button to flash this virtual device.ScreenHunter_302To click OK button to reboot it.ScreenHunter_304Of course, we also need to do the adb reboot command for rebooting this VM.ScreenHunter_279If we log on the VM again, the Welcome screen will show up so that the above flash will be successful.ScreenHunter_306
Google Apps Setting and RunningAs the new phone setup, the first step is choosing a language for us from the list of all available languages.ScreenHunter_269Due to we have a Google account, click Yes button to go aheadScreenHunter_270To key in the Google Account and passwordScreenHunter_271Once the Google account log on successfully, we can go to execute Google Play Store.ScreenHunter_321and begin to install the interesting application as Tower Of SaviorsScreenHunter_322To touch screen to start this game now!ScreenHunter_324
Reference :
(# 1)   ARM Translation Installer can be found by Google Search and Google Apps download URL is http://wiki.cyanogenmod.org/w/Google_Apps
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.