Sunday, October 30, 2016

install dc/os on centos 7

first install and start docker
sudo yum -y install docker docker-registry
[osboxes@osboxes ~]$ sudo systemctl enable docker.service
[osboxes@osboxes ~]$ sudo systemctl start docker.service
[osboxes@osboxes ~]$ sudo systemctl status docker.service


install based on https://dcos.io/docs/1.8/administration/installing/custom/gui/

if you meet permission issue, you need disable selinux

[osboxes@osboxes ~]$ cat /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted







Thursday, October 27, 2016

setup mesos 1.0.1 on centos 7

following the guide at https://mesos.apache.org/gettingstarted/

if you met the following issue, need hack it to change the Version: 2012d to 2012 in file pytz-2012d-py2.7.egg-info


pkg_resources.VersionConflict: (pytz 2012d (/usr/lib/python2.7/site-packages), Requirement.parse('pytz>=2010'))

python examples runs ok with mesos 1.0.1

/home/osboxes/mesos/build/3rdparty/setuptools-20.9.0/pkg_resources/__init__.py:1268: UserWarning: /home/osboxes/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
I1031 02:04:19.299875 13734 sched.cpp:226] Version: 1.0.1
I1031 02:04:19.312309 13773 sched.cpp:330] New master detected at master@10.88.48.57:5050
I1031 02:04:19.313021 13773 sched.cpp:341] No credentials provided. Attempting to register without authentication
I1031 02:04:19.322294 13773 sched.cpp:743] Framework registered with 6a67bc4f-1339-42e0-97bd-dd3243887c2a-0006
Registered with framework ID 6a67bc4f-1339-42e0-97bd-dd3243887c2a-0006
Received offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O15 with cpus: 1.0 and mem: 6609.0
Launching task 0 using offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O15
Task 0 is in state TASK_RUNNING
Task 0 is in state TASK_FINISHED
Received message: 'data with a \x00 byte'
Received offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O16 with cpus: 1.0 and mem: 6609.0
Launching task 1 using offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O16
Task 1 is in state TASK_RUNNING
Task 1 is in state TASK_FINISHED
Received message: 'data with a \x00 byte'
Received offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O17 with cpus: 1.0 and mem: 6609.0
Launching task 2 using offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O17
Task 2 is in state TASK_RUNNING
Task 2 is in state TASK_FINISHED
Received message: 'data with a \x00 byte'
Received offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O18 with cpus: 1.0 and mem: 6609.0
Launching task 3 using offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O18
Task 3 is in state TASK_RUNNING
Task 3 is in state TASK_FINISHED
Received message: 'data with a \x00 byte'
Received offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O19 with cpus: 1.0 and mem: 6609.0
Launching task 4 using offer 6a67bc4f-1339-42e0-97bd-dd3243887c2a-O19
Task 4 is in state TASK_RUNNING
Task 4 is in state TASK_FINISHED
All tasks done, waiting for final framework message
Received message: 'data with a \x00 byte'
All tasks done, and all messages received, exiting
I1031 02:04:26.495678 13773 sched.cpp:1987] Asked to stop the driver
I1031 02:04:26.495754 13773 sched.cpp:1187] Stopping framework '6a67bc4f-1339-42e0-97bd-dd3243887c2a-0006'

I1031 02:04:26.497079 13734 sched.cpp:1987] Asked to stop the driver


Wednesday, October 26, 2016

setup mesos 0.28.2 on centos 7

following the guide at https://mesos.apache.org/gettingstarted/,

it seems mesos-slave.sh need creating folder with root permission to allow examples to run, and needs start with sudo

otherwise the c++/java examples will fail. output from failed c++/java examples
I1027 09:53:10.901875  6181 sched.cpp:222] Version: 0.28.2
I1027 09:53:10.935006  6190 sched.cpp:326] New master detected at master@10.88.48.57:5050
I1027 09:53:10.936367  6190 sched.cpp:336] No credentials provided. Attempting to register without authentication
I1027 09:53:10.948501  6190 sched.cpp:703] Framework registered with 8cab08a7-fac7-440b-8933-0d329da29d7c-0001
Registered! ID = 8cab08a7-fac7-440b-8933-0d329da29d7c-0001
Received offer 8cab08a7-fac7-440b-8933-0d329da29d7c-O1 with cpus: 1.0 and mem: 6609.0
Launching task 0 using offer 8cab08a7-fac7-440b-8933-0d329da29d7c-O1
Status update: task 0 is in state TASK_FAILED
Aborting because task 0 is in unexpected state TASK_FAILED with reason 'REASON_CONTAINER_LAUNCH_FAILED' from source 'SOURCE_SLAVE' with message 'Failed to launch container: Failed to fork executor: Failed to fork a child process: Failed to execute Subprocess::Hook in parent for child '6200': Failed to contain process on systemd; Container destroyed while preparing isolators'
I1027 09:53:11.160939  6191 sched.cpp:1945] Asked to abort the driver
I1027 09:53:11.161355  6191 sched.cpp:1173] Aborting framework '8cab08a7-fac7-440b-8933-0d329da29d7c-0001'
I1027 09:53:11.167614  6181 sched.cpp:1911] Asked to stop the driver
I1027 09:53:11.168745  6193 sched.cpp:1143] Stopping framework '8cab08a7-fac7-440b-8933-0d329da29d7c-0001'

output from passed c++/java examples
I1027 09:44:57.966569  5568 sched.cpp:222] Version: 0.28.2
I1027 09:44:57.976148  5581 sched.cpp:326] New master detected at master@10.88.48.57:5050
I1027 09:44:57.977303  5581 sched.cpp:336] No credentials provided. Attempting to register without authentication
I1027 09:44:57.989959  5581 sched.cpp:703] Framework registered with afdeae7b-3c07-4106-9c4e-58f5efb91352-0002
Registered! ID = afdeae7b-3c07-4106-9c4e-58f5efb91352-0002
Received offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O6 with cpus: 1.0 and mem: 6609.0
Launching task 0 using offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O6
Status update: task 0 is in state TASK_RUNNING
Received offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O7 with cpus: 1.0 and mem: 6609.0
Launching task 1 using offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O7
Status update: task 0 is in state TASK_FINISHED
Finished tasks: 1
Status update: task 1 is in state TASK_RUNNING
Status update: task 1 is in state TASK_FINISHED
Finished tasks: 2
Received offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O8 with cpus: 1.0 and mem: 6609.0
Launching task 2 using offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O8
Status update: task 2 is in state TASK_RUNNING
Status update: task 2 is in state TASK_FINISHED
Finished tasks: 3
Received offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O9 with cpus: 1.0 and mem: 6609.0
Launching task 3 using offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O9
Status update: task 3 is in state TASK_RUNNING
Status update: task 3 is in state TASK_FINISHED
Finished tasks: 4
Received offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O10 with cpus: 1.0 and mem: 6609.0
Launching task 4 using offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O10
Status update: task 4 is in state TASK_RUNNING
Status update: task 4 is in state TASK_FINISHED
Finished tasks: 5
I1027 09:45:02.373884  5577 sched.cpp:1911] Asked to stop the driver
I1027 09:45:02.374039  5577 sched.cpp:1143] Stopping framework 'afdeae7b-3c07-4106-9c4e-58f5efb91352-0002'
I1027 09:45:02.375996  5568 sched.cpp:1911] Asked to stop the driver

couldn't get python example to pass
I1027 09:49:32.158643  5676 sched.cpp:222] Version: 0.28.2
I1027 09:49:32.165624  5714 sched.cpp:326] New master detected at master@10.88.48.57:5050
I1027 09:49:32.166126  5714 sched.cpp:336] No credentials provided. Attempting to register without authentication
I1027 09:49:32.174818  5714 sched.cpp:703] Framework registered with afdeae7b-3c07-4106-9c4e-58f5efb91352-0003
Registered with framework ID afdeae7b-3c07-4106-9c4e-58f5efb91352-0003
Received offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O11 with cpus: 1.0 and mem: 6609.0
Launching task 0 using offer afdeae7b-3c07-4106-9c4e-58f5efb91352-O11
Task 0 is in state TASK_FAILED
The update data did not match!
  Expected: 'data with a \x00 byte'
  Actual:   ''
Failed to call scheduler's statusUpdate

rest api http://master:5050/help
master metrics http://master:5050/metrics/snapshot


adjust screen resolution of centos 7 on virtualbox player

you can download centos image from http://www.osboxes.org/centos/

once centos running, by default its network is off. enable the network by clicking the right upper corner settings.


now run the following commands with root

sudo yum install epel-release
sudo yum install dkms
sudo yum groupinstall "Development Tools"
sudo yum install kernel-devel
sudo yum install kernel-headers
reboot

click device > install guest additions cd images, and restart again. the screen resolution will be adjusted to fit.


if you meet errors such as "your kernel headers for kernel cannot be found...", please go to /usr/src/kernels, and rename the kernel folder name to match exactly the version under /lib/modules


Saturday, March 31, 2012

Enable HiDPI in OSX

The MacBook Pro 15" comes with native high resolution 1680X1050, with tiny system fonts. You can lower the resolution with the compromise of fuzzy fonts. There is one approach can be taken similar to Windows DPI adjustment. This is called HiDPI.

You need install XCode, and use Guartz Debug to enable HiDPI. It does something magic, but very limited. On MacBook Pro, I can only get 840X525 in HiDPI.


Correction: You don't need install XCode, simply install Graphics Tools for XCode will do. It can be downloaded from Apple Developer site.

OSX display tweakit


font smoothing 
defaults -currentHost write -globalDomain AppleFontSmoothing -int 1
display scaling
defaults -currentHost write -globalDomain AppleDisplayScaleFactor 1.5
font anti aliasing
defaults -currentHost write -globalDomain AppleAntiAliasingThreshold 18

but none of them works as you would expect

Monday, September 26, 2011

awesome HTC WildFire A510e ROM


I have a HTC WildFire A510e phone, with S-OFF, and lots of junk applications pre-installed. I want a mean and lean OS.


I tried several root.zip, and ROMs, it is the only one works for me.

Before doing that, you need install Recovery http://www.shuaji.net/rom/dopod_HTC/G13_A510e/g13_soft/2011070613877.html

The ROM and how-to is located at http://www.shuaji.net/rom/dopod_HTC/G13_A510e/ROM/2011092214393.html.






Monday, May 09, 2011

jailbreak iphone

if redsn0w stuck at uploading ramdisk part, make sure the redsn0w Affinity is set to 1 CPU only (Task Manager > Process > Set Affinity for redsn0w process).